//主页相关方法

const {
    execSQL
} = require('../db/mysql')



//主页商品数据
const getHomeGood = ({
    type,
    page
}) => {
    let sql = `select list from home_good where type = '${type}' and page = '${page}'`
    return execSQL(sql).then((res) => {
        return res[0].list ? JSON.parse(res[0].list) : false;
    }).catch(e => {
        throw e;
        return false;
    })
}




module.exports = {
    getHomeGood,
}